package com.yequan.sourcecode;

import java.util.*;

/**
 * 集合相关源码阅读
 *
 * @author : Administrator
 * @date : 2020/3/10
 */
public class CollectionCode {

    public static void main(String[] args) {
//        List<Object> objects = new ArrayList<>();
//        Vector<Object> objectVector = new Vector<>();
//        objects.add(new Object());
//        List<Object> objectLinkedList = new LinkedList<>();
//        objectLinkedList.add(new Object());
//        Object o = objectLinkedList.get(0);
//        Iterator<Object> iterator = objectLinkedList.iterator();
//        while (iterator.hasNext()) {
//            System.out.println(iterator.next());
//        }

        hashMap();
    }


    public static void showAllCollection() {
        List<Object> arrayList = new ArrayList<>();
        Vector<Object> vector = new Vector<Object>();
        List<Object> linkedList = new LinkedList<>();
        Stack<Object> stack = new Stack<>();
        Queue<Object> queue = new PriorityQueue<>();
        Set<Object> set = new HashSet<>();
        Map<String, Object> map = new HashMap<>();
    }

    public static void hashMap() {
        Map<Integer, String> map = new HashMap<>(14);
        map.put(1, "a");
    }

}
